package com.indusfo.spc.mapper;

import com.indusfo.spc.pojo.MatDete;
import com.indusfo.spc.pojo.OrderDete;
import com.indusfo.spc.pojo.OrderDete;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Author liub
 * @Date 2019/11/26 14:22
 * @Version 1.0
 */

public interface OrderDeteMapper {
    /**
     * 新增
     */
    int insertOrderDete(OrderDete orderDete);

    /**
     * 修改
     */
    int updateOrderDete(OrderDete orderDete);

    /**
     * 查询
     */
    List<OrderDete> queryOrderDete(OrderDete orderDete);

    /**
     * 总数
     */
    int countOrderDete(OrderDete orderDete);

    /**
     * 判重
     */
    int checkOrderDete(OrderDete orderDete);

    /**
     * 启停
     */
    int deleteOrderDete(@Param("orderDeteIds") List<Integer> orderDeteIds, @Param("dataState") Integer dataState);

    /**
     * 级联删除查询
     */
    List<OrderDete> queryOrderDeteByOrderFlowId(@Param("orderFlowId") Integer orderFlowId);

    /**
     * 级联删除
     */
    int deleteOrderDeteByOrderDeteId(@Param("orderDeteId") Integer orderDeteId, @Param("dataState") Integer dataState);

    /**
     * 新增产品流程下 的工序流程下的采集项目到任务单流程下 的工序流程下的采集项目
     * @param matDeteList
     * @return
     */
    int insertOrderDeteByMatDeteList(@Param("matDeteList")List<MatDete> matDeteList);

}